Integrand size = 21, antiderivative size = 55 \[ \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {\text {arctanh}(\cosh (c+d x))}{a d}+\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b} d} \]
Result contains complex when optimal does not.
Time = 0.69 (sec) , antiderivative size = 135, normalized size of antiderivative = 2.45 \[ \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {\frac {i \sqrt {b} \arctan \left (\frac {-i \sqrt {a+b}-\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{\sqrt {a+b}}+\frac {i \sqrt {b} \arctan \left (\frac {-i \sqrt {a+b}+\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{\sqrt {a+b}}-\log \left (\cosh \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sinh \left (\frac {1}{2} (c+d x)\right )\right )}{a d} \]
((I*Sqrt[b]*ArcTan[((-I)*Sqrt[a + b] - Sqrt[a]*Tanh[(c + d*x)/2])/Sqrt[b]] )/Sqrt[a + b] + (I*Sqrt[b]*ArcTan[((-I)*Sqrt[a + b] + Sqrt[a]*Tanh[(c + d* x)/2])/Sqrt[b]])/Sqrt[a + b] - Log[Cosh[(c + d*x)/2]] + Log[Sinh[(c + d*x) /2]])/(a*d)
Time = 0.27 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.96, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 26, 4147, 25, 303, 219, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {i}{\sin (i c+i d x) \left (a-b \tan (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle i \int \frac {1}{\sin (i c+i d x) \left (a-b \tan (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 4147 |
\(\displaystyle \frac {\int -\frac {1}{\left (1-\text {sech}^2(c+d x)\right ) \left (-b \text {sech}^2(c+d x)+a+b\right )}d\text {sech}(c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \frac {1}{\left (1-\text {sech}^2(c+d x)\right ) \left (-b \text {sech}^2(c+d x)+a+b\right )}d\text {sech}(c+d x)}{d}\) |
\(\Big \downarrow \) 303 |
\(\displaystyle \frac {\frac {b \int \frac {1}{-b \text {sech}^2(c+d x)+a+b}d\text {sech}(c+d x)}{a}-\frac {\int \frac {1}{1-\text {sech}^2(c+d x)}d\text {sech}(c+d x)}{a}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {b \int \frac {1}{-b \text {sech}^2(c+d x)+a+b}d\text {sech}(c+d x)}{a}-\frac {\text {arctanh}(\text {sech}(c+d x))}{a}}{d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}-\frac {\text {arctanh}(\text {sech}(c+d x))}{a}}{d}\) |
(-(ArcTanh[Sech[c + d*x]]/a) + (Sqrt[b]*ArcTanh[(Sqrt[b]*Sech[c + d*x])/Sq rt[a + b]])/(a*Sqrt[a + b]))/d
3.1.29.3.1 Defintions of rubi rules used
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[1/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Simp[b/(b *c - a*d) Int[1/(a + b*x^2), x], x] - Simp[d/(b*c - a*d) Int[1/(c + d*x ^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Simp[1/(f*ff^ m) Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m + 1 )), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[( m - 1)/2]
Time = 0.36 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.22
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {b \,\operatorname {arctanh}\left (\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{a \sqrt {a b +b^{2}}}}{d}\) | \(67\) |
default | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {b \,\operatorname {arctanh}\left (\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{a \sqrt {a b +b^{2}}}}{d}\) | \(67\) |
risch | \(-\frac {\ln \left ({\mathrm e}^{d x +c}+1\right )}{d a}+\frac {\ln \left ({\mathrm e}^{d x +c}-1\right )}{d a}+\frac {\sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{2 \left (a +b \right ) d a}-\frac {\sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{2 \left (a +b \right ) d a}\) | \(139\) |
1/d*(1/a*ln(tanh(1/2*d*x+1/2*c))+b/a/(a*b+b^2)^(1/2)*arctanh(1/4*(2*tanh(1 /2*d*x+1/2*c)^2*a+2*a+4*b)/(a*b+b^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 197 vs. \(2 (47) = 94\).
Time = 0.29 (sec) , antiderivative size = 587, normalized size of antiderivative = 10.67 \[ \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\left [\frac {\sqrt {\frac {b}{a + b}} \log \left (\frac {{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} + 2 \, {\left (a + 3 \, b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a + 3 \, b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + {\left (a + 3 \, b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + {\left (a + b\right )} \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \cosh \left (d x + c\right ) + {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a + b\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {b}{a + b}} + a + b}{{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} + 2 \, {\left (a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a + b}\right ) - 2 \, \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) + 2 \, \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right )}{2 \, a d}, \frac {\sqrt {-\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + {\left (a + b\right )} \sinh \left (d x + c\right )^{3} + {\left (a - 3 \, b\right )} \cosh \left (d x + c\right ) + {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a - 3 \, b\right )} \sinh \left (d x + c\right )\right )} \sqrt {-\frac {b}{a + b}}}{2 \, b}\right ) - \sqrt {-\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cosh \left (d x + c\right ) + {\left (a + b\right )} \sinh \left (d x + c\right )\right )} \sqrt {-\frac {b}{a + b}}}{2 \, b}\right ) - \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) + \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right )}{a d}\right ] \]
[1/2*(sqrt(b/(a + b))*log(((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 + 2*(a + 3*b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 + a + 3*b)*sinh(d*x + c)^2 + 4*((a + b)*co sh(d*x + c)^3 + (a + 3*b)*cosh(d*x + c))*sinh(d*x + c) + 4*((a + b)*cosh(d *x + c)^3 + 3*(a + b)*cosh(d*x + c)*sinh(d*x + c)^2 + (a + b)*sinh(d*x + c )^3 + (a + b)*cosh(d*x + c) + (3*(a + b)*cosh(d*x + c)^2 + a + b)*sinh(d*x + c))*sqrt(b/(a + b)) + a + b)/((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh( d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 + 2*(a - b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 + a - b)*sinh(d*x + c)^2 + 4*((a + b)* cosh(d*x + c)^3 + (a - b)*cosh(d*x + c))*sinh(d*x + c) + a + b)) - 2*log(c osh(d*x + c) + sinh(d*x + c) + 1) + 2*log(cosh(d*x + c) + sinh(d*x + c) - 1))/(a*d), (sqrt(-b/(a + b))*arctan(1/2*((a + b)*cosh(d*x + c)^3 + 3*(a + b)*cosh(d*x + c)*sinh(d*x + c)^2 + (a + b)*sinh(d*x + c)^3 + (a - 3*b)*cos h(d*x + c) + (3*(a + b)*cosh(d*x + c)^2 + a - 3*b)*sinh(d*x + c))*sqrt(-b/ (a + b))/b) - sqrt(-b/(a + b))*arctan(1/2*((a + b)*cosh(d*x + c) + (a + b) *sinh(d*x + c))*sqrt(-b/(a + b))/b) - log(cosh(d*x + c) + sinh(d*x + c) + 1) + log(cosh(d*x + c) + sinh(d*x + c) - 1))/(a*d)]
\[ \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int \frac {\operatorname {csch}{\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \]
\[ \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int { \frac {\operatorname {csch}\left (d x + c\right )}{b \tanh \left (d x + c\right )^{2} + a} \,d x } \]
-log((e^(d*x + c) + 1)*e^(-c))/(a*d) + log((e^(d*x + c) - 1)*e^(-c))/(a*d) - 2*integrate((b*e^(3*d*x + 3*c) - b*e^(d*x + c))/(a^2 + a*b + (a^2*e^(4* c) + a*b*e^(4*c))*e^(4*d*x) + 2*(a^2*e^(2*c) - a*b*e^(2*c))*e^(2*d*x)), x)
\[ \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int { \frac {\operatorname {csch}\left (d x + c\right )}{b \tanh \left (d x + c\right )^{2} + a} \,d x } \]
Time = 2.60 (sec) , antiderivative size = 284, normalized size of antiderivative = 5.16 \[ \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (9\,b^4\,\sqrt {-a^2\,d^2}+16\,a^2\,b^2\,\sqrt {-a^2\,d^2}+24\,a\,b^3\,\sqrt {-a^2\,d^2}\right )}{16\,d\,a^3\,b^2+24\,d\,a^2\,b^3+9\,d\,a\,b^4}\right )}{\sqrt {-a^2\,d^2}}-\frac {\sqrt {b}\,\left (2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {-a^3\,d^2-b\,a^2\,d^2}\,\sqrt {-a^2\,d^2\,\left (a+b\right )}+{\mathrm {e}}^{3\,c}\,{\mathrm {e}}^{3\,d\,x}\,\sqrt {-a^3\,d^2-b\,a^2\,d^2}\,\sqrt {-a^2\,d^2\,\left (a+b\right )}+4\,a^2\,b\,d^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c}{2\,a\,\sqrt {b}\,d\,\sqrt {-a^2\,d^2\,\left (a+b\right )}}\right )-2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {-a^2\,d^2\,\left (a+b\right )}}{2\,a\,\sqrt {b}\,d}\right )\right )}{2\,\sqrt {-a^3\,d^2-b\,a^2\,d^2}} \]
- (2*atan((exp(d*x)*exp(c)*(9*b^4*(-a^2*d^2)^(1/2) + 16*a^2*b^2*(-a^2*d^2) ^(1/2) + 24*a*b^3*(-a^2*d^2)^(1/2)))/(24*a^2*b^3*d + 16*a^3*b^2*d + 9*a*b^ 4*d)))/(-a^2*d^2)^(1/2) - (b^(1/2)*(2*atan((exp(d*x)*exp(c)*(- a^3*d^2 - a ^2*b*d^2)^(1/2)*(-a^2*d^2*(a + b))^(1/2) + exp(3*c)*exp(3*d*x)*(- a^3*d^2 - a^2*b*d^2)^(1/2)*(-a^2*d^2*(a + b))^(1/2) + 4*a^2*b*d^2*exp(d*x)*exp(c)) /(2*a*b^(1/2)*d*(-a^2*d^2*(a + b))^(1/2))) - 2*atan((exp(d*x)*exp(c)*(-a^2 *d^2*(a + b))^(1/2))/(2*a*b^(1/2)*d))))/(2*(- a^3*d^2 - a^2*b*d^2)^(1/2))